﻿<%@ Page Title="Manage Private Log | NoBrainer - Sample" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="TanzimSaqib.NoBrainer.Sample.Account.Manage" %>
<%@ Import Namespace="TanzimSaqib.NoBrainer.Sample.DataAccess" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1>Posts</h1>
    
    <p>
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Account/CreatePost.aspx">Create Post</asp:HyperLink>
    </p>

    <p style="text-align: left; width: 800px;">
        <asp:GridView ID="GridView1" runat="server" 
            AutoGenerateColumns="False" CellPadding="4" 
            ForeColor="#333333" GridLines="None" Width="920px" 
            DataKeyNames="ID" onselectedindexchanged="GridView1_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField HeaderText="Action" ShowCancelButton="False" 
                    ShowSelectButton="True" SelectText="Edit" />
                <asp:BoundField DataField="ID" HeaderText="ID" Visible="False" 
                    ReadOnly="True" />
                <asp:TemplateField HeaderText="Title">
                    <ItemTemplate>
                        <a href="../Post.aspx?ID=<%# Eval("ID") %>"><%# Eval("Title") %></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Status">
                    <ItemTemplate>
                        <%# Enum.GetName(typeof(Post.StatusEnum), Eval("Status"))%>
                    </ItemTemplate>
                </asp:TemplateField>
 
                <asp:BoundField DataField="Created" HeaderText="Created" 
                    SortExpression="Created" DataFormatString="{0:R}" ReadOnly="True" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </p>

</asp:Content>
